/*
 * 23/10/2011 - 19:41
 */
package org.nettyflux.tcp;

import org.nettyflux.netmessages.Ack;
import org.nettyflux.netmessages.FailAck;
import org.nettyflux.netmessages.NetworkMessage;

/**
 * @author Victor Williams Stafusa da Silva
 */
public final class TCPServerCloseConnectionCommand implements NetworkMessage {

    private final int port;

    public TCPServerCloseConnectionCommand(int port) {
        this.port = port;
    }

    public int getPort() {
        return port;
    }

    public Ack<TCPServerCloseConnectionCommand> makeAck() {
        return new Ack<TCPServerCloseConnectionCommand>(this);
    }

    public FailAck<TCPServerCloseConnectionCommand> makeFailAck(Throwable badNews) {
        return new FailAck<TCPServerCloseConnectionCommand>(this, badNews);
    }
}
